package com.toocms.jinjuhang.ui.mine.order.logistics_details

import com.toocms.jinjuhang.R
import com.toocms.jinjuhang.BR
import com.toocms.jinjuhang.databinding.FgtLogisticsDetailsBinding
import com.toocms.jinjuhang.ui.base.BaseFgt
import com.toocms.jinjuhang.widget.decoration.TimerShaftDecoration
import com.toocms.tab.TooCMSApplication
import com.toocms.tab.binding.viewadapter.recyclerview.DividerLine

class LogisticsDetailsFgt : BaseFgt<FgtLogisticsDetailsBinding, LogisticsDetailsModel>() {
    override fun onFragmentCreated() {
        topBar.setTitle(R.string.str_logistics_details)
        val itemDecoration = TimerShaftDecoration(requireContext()).apply {
            setCurrentTimeDotRes(R.mipmap.icon_logistics_current_dot)
            setDefaultTimeDotRes(R.drawable.shape_logistics_default_dot)
            setTimerShaftLineWidth(2)
            setTimerShaftLineColor(0xFFEDEDED.toInt())
            setBackgroundColor(0xFFFFFFFF.toInt())
            setCurrentDotPosition(1)
            setAligningViewId(R.id.info_tv)
            setLineExceedDot(false)
            setStartDrawPosition(1)
            timerShaftWidth = 50
        }
        binding.contentRv.addItemDecoration(itemDecoration)
        binding.contentRv.addItemDecoration(
            DividerLine(
                requireContext(),
                1,
                0x00000000,
                DividerLine.LineDrawMode.HORIZONTAL
            )
        )
    }

    override fun getLayoutResId() = R.layout.fgt_logistics_details

    override fun getVariableId() = BR.logisticsDetailsModel

    override fun viewObserver() {

    }

    override fun getViewModel()=LogisticsDetailsModel(TooCMSApplication.getInstance(),arguments)

}